generic unit of work pattern c